package com.ruoyi.littleRedBook.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("notifications")
public class Notification {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    private String title;

    private String content;

    private Integer type; // 1-系统通知 2-订单通知 3-商品通知 4-交易通知

    @TableField("related_id")
    private Long relatedId; // 关联业务ID（订单ID/商品ID等）

    @TableField("is_read")
    private Integer isRead; // 0-未读 1-已读

    @TableField("created_at")
    private LocalDateTime createdAt;
}
